<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <title>初始化代码信息</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.2/style/weui.min.css">
    <link href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.css" rel="stylesheet">
</head>
<body>
<div style="padding:15px;">
    <button  class="weui-btn weui-btn_primary" type="button" id="showImag">点我查看图片</button>
</div>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
<script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/jquery-weui.min.js"></script>
<script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/swiper.js"></script>
<script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/city-picker.js"></script>
<script src="../../lib/web/photo-view/PhotoViewUtils.js"></script>
<script>
    $(document).ready(function(){
        var items = [
            {
                image: "../eshop/img/neiyi_21.jpg",
                caption: "描述文案"
            },
            {
                image: "../eshop/img/neiyi_26.jpg",
                caption: "描述文案"
            },
            {
                image: "../eshop/img/neiyi_30.jpg",
                caption: "描述文案"
            }
        ]
        var config = {
            "items":items
        }
        var photoView = new PhotoViewUtils(config);
        photoView.init();
        $("#showImag").click(function(){
            photoView.onShow(2);
        })
    });
</script>
</body>
</html>